package Composite;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;


public class Flickr extends Dossier{
    
    private static Flickr instance;
    private static BufferedImage vignetteFlickr;
    
    private Flickr() {
        
        super(RacineLogique.getRacine(), null, "Flickr");
               
    }
    
    public static Flickr getInstance(){
        
        if(instance==null) instance = new Flickr();
        
        return instance;
    }
    
    public static void setInstance(Flickr i){
        
        instance=i;
    }
    
            public Image getVignette() {
        
          if(vignetteFlickr!=null) return vignetteFlickr;
          try {
            vignetteFlickr = ImageIO.read(new File("dossier100flickr.png"));
         } catch (IOException ex) {
            System.out.println("Erreur de lecteur vignette de dossier");
        }          
            return vignetteFlickr;
        }
            
            
    
      public ImageIcon getRepresentation() {

        return Element.flickr;
    }
}
